﻿<Window x:Class="Resn.WhuPub.WPFClientUI.CreateMajorWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStartupLocation="CenterScreen" Style="{StaticResource WindowStyle}"
        Loaded="Window_Loaded" MouseDown="Window_OnMouseDown" >
        <Grid Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Text="新建专业"  />

                <Grid Grid.Row="1">
                        <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="1" Grid.Row="1" Text="科目" 
                                   HorizontalAlignment="Left" />

                        <TextBlock Grid.Column="1" Grid.Row="1" Text="科目" 
                                   HorizontalAlignment="Left" />

                        <TextBlock Grid.Column="2" Grid.Row="2" HorizontalAlignment="Right" Text="名称"
                                    VerticalAlignment="Center" />
                        <TextBlock Grid.Column="3" Grid.Row="2" MinWidth="280"
                                    Text="{Binding Subject.Name}" />

                        <TextBlock Grid.Column="2" Grid.Row="3" HorizontalAlignment="Right" Text="代码"
                                    />
                        <TextBlock Grid.Column="3" Grid.Row="3"
                                     Text="{Binding Subject.Code}"/>

                        <TextBlock Grid.Column="1" Grid.Row="4" Text="专业" 
                                   HorizontalAlignment="Center"/>
                        <TextBlock Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" Text="名称"
                                   VerticalAlignment="Top"  />
                        <TextBox Grid.Column="3" Grid.Row="5" VerticalAlignment="Top"
                                 
                                 Text="{Binding MajorName, UpdateSourceTrigger=PropertyChanged}" />

                        <TextBlock Grid.Column="2" Grid.Row="6" HorizontalAlignment="Right"
                                   Text="代码" VerticalAlignment="Center"  />
                        <TextBox Grid.Column="3" Grid.Row="6" HorizontalAlignment="Stretch"
                                 VerticalAlignment="Center"
                                  Text="{Binding MajorCode,UpdateSourceTrigger=PropertyChanged}" />
                </Grid>
                <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="1" Style="{DynamicResource WindowCancelButtonStyle}"/>
                        <Button Grid.Column="2" Style="{DynamicResource WindowAcceptButtonStyle}" Click="AcceptButton_Click" />
                </Grid>
        </Grid>
</Window>